<?php
@session_start();
//require '../execute/auth.php';
require_once('inc/config.inc');

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
	die('Failed to connect to server: ' . mysql_error());
}

//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
	die("Unable to select database");
}
$id=$_SESSION['SESS_USER_ID'];
$q= mysql_query("SELECT * FROM `users` WHERE id='$id'");
$pro = mysql_fetch_array($q);

?>
<!DOCTYPE HTML>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<title>TECHWORKS</title>

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<!-- Le styles -->


<!-- Le fav and touch icons -->
<link href='assets/favicon-6c3a39685626012e7563512c4da1ad9a.ico'
	rel='shortcut icon' />
<link rel="stylesheet" href="assets/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="assets/css/bootstrap-responsive.css"
	type="text/css" />
<link rel="stylesheet" href="assets/css/font-awesome.css"
	type="text/css" />
<script type="text/javascript" src="assets/js/jquery.min.js"></script>

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap-popover.js"></script>
<script type="text/javascript" src="assets/js/bootstrap-tooltip.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#lrnmore").click(function(){
		$("#abhero").hide();
		$("#det").show();
	
	});
	
	$("#gb").click(function(){
		$("#det").hide();
		$("#abhero").show();
	
	});

});

</script>
<script>
$(function ()
{ 
$("input").popover({trigger: 'focus'});

$("textarea").popover({trigger: 'focus'});


$('.btn').tooltip({'placement':'bottom', 'trigger' : 'hover'});

$('a').tooltip({'placement':'bottom', 'trigger' : 'hover'});

	
	
	
	
});
</script>

</head>
<body>


	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner" style="border-radius: 0">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="index.php">TECHWORKS</a>
				<div class="nav-collapse collapse">

					<ul class="nav">
						<li><a href="about.php"><i class="icon-user"></i>&nbsp;About</a></li>
						<li><a href="services.php"><i class="icon-signal"></i>&nbsp;Services</a>
						</li>
						<li><a href="partners.php"><i class="icon-group"></i>&nbsp;Parteners</a>
						</li>
						<li><a href="media.php"><i class="icon-film"></i>&nbsp;Media</a></li>
						<li><a href="joinus.php"><i class="icon-link"></i>&nbsp;Join
								Us</a></li>
						<li><a href="resources.php"><i class="icon-gear"></i>&nbsp;
								Resources</a></li>
						<!--<li><a href="#"><i class="icon-question-sign icon-white"></i>&nbsp;Learning</a></li>-->
					</ul>
					<ul class="nav pull-right">
                  	<?php
				if (isset ( $_SESSION ['SESS_USER_ID'] ) || (@trim ( $_SESSION ['SESS_USER_ID'] ) != '')) {
					
				?>
						<li class="dropdown active"><a class="dropdown-toggle" href="#"
							data-toggle="dropdown"><i class=" icon-unlock"></i>&nbsp;Logged in as: <?php echo $_SESSION['SESS_MEMBER_EMAIL']; ?> <strong
								class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li><a href="users/<?php echo $pro['role']; ?>/index.php"><i class="icon-edit"></i>&nbsp;My Account</a></li>
								<li><a href="#"><i class="icon-cog"></i>&nbsp;Account Settings</a></li>
								<li class="divider"></li>
								<li><a href="execute/logout.php"><i class="icon-signout"></i>&nbsp;Quit</a></li>
							</ul></li>
                  	<?php
																			} else {
																				?>
                  	
						<li class="divider-vertical"></li>
						<li class="dropdown"><a class="dropdown-toggle" href="#"
							data-toggle="dropdown"><i class=" icon-user icon-white"></i>&nbsp;Sign
								In <strong class="caret"></strong></a>
							<div class="dropdown-menu"
								style="padding: 15px; padding-bottom: 0px;">
								<form method="post" action="execute/login.php"
									accept-charset="UTF-8" id="loginid" data-validate="parsley">
									<input style="margin-bottom: 15px;" type="text"
										placeholder="Username" id="username" name="secname"
										data-required="true"> <input style="margin-bottom: 15px;"
										type="password" placeholder="Password" id="password"
										name="secpass" data-required="true"> <input
										class="btn btn-success btn-block" type="submit" id="sign-in"
										value="Sign In"
										onclick="javascript:$('#loginid').parsley( 'validate' );">
									<!--<label style="text-align:center;margin-top:5px">or</label>
                                <input class="btn btn-primary btn-block" type="button" id="sign-in-google" value="Sign In with Google">
								<input class="btn btn-primary btn-block" type="button" id="sign-in-twitter" value="Sign In with Twitter">-->
								</form>
							</div></li>
					<?php
																			}
																			?>
					
				</ul>
				</div>
				<!--/.nav-collapse -->
			</div>
			<!--/.container-fluid -->
		</div>
		<!--/.navbar-inner -->
	</div>
	<!--/.navbar -->